package com.fastloan.mgt.product.basics.service;

import com.fastloan.mgt.product.basics.model.Product;

import com.fastloan.mgt.product.basics.model.vo.ProductVO;

import com.fastloan.mgt.product.basics.model.vo.ProductHotExt;

import com.fastloan.mgt.product.expection.ProductApproveException;
import com.kawins.base.BaseService;
import com.kawins.supers.file.core.FileLoadBean;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @author admins
 *         createTime 2017/11/06
 */
public interface ProductService extends BaseService<Product> {

    /**
     * 创建产品
     *
     * @param product
     * @param file
     * @return
     */
    String createProduct(Product product, MultipartFile[] file);

    /**
     * 获取产品参数
     * @return
     */
    Map<String, Object> getDictionary();


    /**
     * 获取产品信息
     * @param productId
     * @return
     */
    ProductVO getProduct(String productId);

    /**
     * 产品发布与禁用
     * @param productId
     * @return
     */
    Integer releaseOrForbidden(String productId) throws ProductApproveException;
    
    List<ProductHotExt> queryAddressProduce(Map<String, Object> map);

    List<ProductHotExt> selectRollingGraph(Map<String, Object> map);

    List<ProductHotExt> queryHotSell(Map<String, Object> map);

    List<ProductHotExt> queryByOrg(Map<String, Object> map);

    /**
     *
     * @param fileLoadBeanList
     * @param product
     */
    void updateLogoUrl(List<FileLoadBean> fileLoadBeanList, Product product);

    List<Product> pageList(Map<String ,Object> map);

    List<Product> getAllProduct();

    /**
     * 查询序列
     *
     * @return 序列
     */
    Long selectSequence(String orgId);
}
